<%-- 
    Document   : index
    Created on : 17-sep-2013, 16:29:57
    Author     : joelpacheco
--%>

<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>GedeonMvc</title>
        <%@include file="../../template/estilos.jsp"%>
        <%@include file="../../template/script.jsp" %>

        <script type="text/javascript">
            var oTable;
            oTable = $(document).ready(function() {
                $('#table').dataTable({
                    "bProcessing": true,
                    "bServerSide": true,
                    //"bJQueryUI" : true,
                    "bAutoWidth": true,
                    //"sPaginationType" : "full_numbers",
                    "sAjaxSource": "/GedeonMvc/service/ajax",
                    "fnServerData": function(sSource, aoData, fnCallback) {
                        $.ajax({
                            "dataType": 'json',
                            "type": "POST",
                            //"url": sSource,
                            "url": "/GedeonMvc/service/ajax",
                            "data": aoData,
                            "success": fnCallback
                        });
                    }
                });
            });
        </script>

    </head>

    <body class="page-header-fixed">

        <%@include file="../../template/header.jsp"%>

        <div class="page-container">

            <%@include file="../../template/sidebar.jsp"%>
            <!--<input id="menu" type="hidden" name="menu" value="rol">
            <input id="modulo" type="hidden" name="modulo" value="index">-->
            <div class="page-content">
                <%@include file="../../template/header_module.jsp"%>
                <!-- <c:forEach var="module" items="${moduleData}">
                     <div class="row-fluid">
                         <div class="span12"> 
                             <h3 class="page-title">${module.moduleName}
                                 <small>Description module</small>
                             </h3>
                             <ul class="breadcrumb">
                                 <li>
                                     <i class="icon-home"></i>
                                     <a href="index.html">${module.parentTab}</a> 
                                     <span class="icon-angle-right"></span>
                                 </li>
                                 <li>
                                     <a href="#">${module.moduleName}</a> 
                                 </li> 
                             </ul>
                         </div>
                     </div>
 
                </c:forEach>-->

                <div class="row-fluid">
                    <div class="span12">
                        <!-- BEGIN EXAMPLE TABLE PORTLET-->
                        <div class="portlet box light-grey">
                            <div class="portlet-title">
                                <div class="caption"><i class="icon-globe"></i>Managed Table</div>
                                <div class="tools">
                                    <a href="javascript:;"  onclick="loadList();" class="reload"></a>
                                </div>
                            </div>
                            <div class="portlet-body">
                                <div class="clearfix">
                                    <div class="btn-group">
                                        <a href="new?module=${sessionScope["module"]}" class="btn green">Add New <i class="icon-plus"></i>
                                        </a>
                                        <!--<a href="new?module=<%= request.getParameter("module")%>" class="btn green">Add New <i class="icon-plus"></i>
                                        </a>-->
                                    </div>
                                    <div class="btn-group pull-right">
                                        <button class="btn dropdown-toggle" data-toggle="dropdown">Tools <i class="icon-angle-down"></i>
                                        </button>
                                        <ul class="dropdown-menu pull-right">
                                            <li><a href="#">Print</a></li>
                                            <li><a href="#">Save as PDF</a></li>
                                            <li><a href="#">Export to Excel</a></li>
                                        </ul>
                                    </div>
                                </div> 
                                ${message}
                                <div class="portlet-body">
                                    <div id="sample_2_wrapper"
                                         class="dataTables_wrapper form-inline" role="grid">
                                        <table id="table"
                                               class="table table-striped table-bordered table-hover table-full-width dataTable"
                                               aria-describedby="sample_1_info">
                                            <thead>
                                                <tr>
                                                    <th>Id</th>
                                                    <th>Codigo</th>
                                                    <th>Nombre</th>
                                                    <th>Proveedor</th>
                                                    <th>Fecha de registro</th>
                                                    <th>Acción</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <tr>
                                                    <td colspan="5" class="dataTables_empty">Loading data
                                                        from server</td>
                                                </tr>
                                            </tbody>
                                            <tfoot>
                                                <tr>
                                                    <th>Id</th>
                                                    <th>Codigo</th>
                                                    <th>Nombre</th>
                                                    <th>Proveedor</th>
                                                    <th>Fecha de registro</th>
                                                    <th>Acción</th>
                                                </tr>
                                            </tfoot>
                                        </table>
                                        <div data-keyboard="false" data-backdrop="static" tabindex="-1" class="modal hide fade" id="delete" style="display: none; margin-top: -61.5px;" aria-hidden="true">
                                            <div class="modal-body">
                                                <p>Esta seguro de eliminar este registro?</p>
                                            </div>
                                            <div class="modal-footer">
                                                <button class="btn" data-dismiss="modal" type="button">Cancelar</button>
                                                <button id="btndelete"  class="btn green"  type="button">Continuar</button>
                                                <input type="hidden" id="deleted" value="0">
                                            </div>
                                        </div>
                                    </div>
                                </div>          
                            </div>
                        </div>
                        <!-- END EXAMPLE TABLE PORTLET-->
                    </div>
                </div>


            </div>
        </div>
        <%@include file="../../template/footer.jsp"%>

    </body>
</html>
